import java.util.LinkedList;
import java.util.Queue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DickYang
 * Date: 2023-07-10
 * Time: 15:52
 */
public class MyQueueTest {
    public static void main(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);

        myQueue.poll();
        myQueue.peek();
        myQueue.size();
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1); // 入队列
        queue.offer(2);
        queue.offer(3);
        System.out.println(queue.isEmpty()); // 判断队列是否为空
        System.out.println(queue.poll()); //出队列
        System.out.println(queue.peek()); //获取队列头元素
        System.out.println(queue.size()); //获取队列的长度
    }
}
